﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace Plugin.TradeSharp.UserControls
{
    public partial class UCRiskSettingRule1 : UserControl
    {
        public UCRiskSettingRule1()
        {
            InitializeComponent();
        }
        public string Title
        {
            get
            {
                return "资产设置";
            }
        }
        public double TotalCapital
        {
            get 
            {
                var ret =    string.IsNullOrEmpty(this.txtbox_TotalCapital.Text) ? 0 : double.Parse(this.txtbox_TotalCapital.Text);
             return ret;
            }
            set
            {
                this.txtbox_TotalCapital.Text = value.ToString();
            }
        }

        public double StockCapital
        {
            get
            {
                var ret = string.IsNullOrEmpty(this.txtbox_StockCapital.Text) ? 0:  double.Parse(this.txtbox_StockCapital.Text);
                return ret;
            }
            set
            {
                this.txtbox_StockCapital.Text = value.ToString();
            }
        }

        public double FutureCapital
        {
            get
            {
                var ret =string.IsNullOrEmpty(this.txtbox_FutureCapital.Text)? 0: double.Parse(this.txtbox_FutureCapital.Text);
                return ret;
            }
            set
            {
                this.txtbox_FutureCapital.Text = value.ToString();
            }
        }

    }
}
